const fileStore = {
  state: {
    hideScroll: false,
    showList: true,
    showNav: true,
    defaultExpanded: [],
  },
  actions: {
    handleHideScroll: ({ commit }, val) => { 
      commit('HANDLEHIDESCROLL', val)
    },
    handleShowList: ({ commit }, val) => { 
      commit('HANDLESHOWLIST', val)
    },
    handleShowNav: ({ commit }, val) => { 
      commit('HANDLESHOWNAV', val)
    },
    handleExpanded: ({ commit }, val) => { 
      commit('HANDLEEXPANDED', val)
    },
  },
  mutations: {
    HANDLEHIDESCROLL: (state, val) => {
      state.hideScroll = val
      state.showList = !val
      state.showNav = true
      console.log(val)
    },
    HANDLESHOWLIST: (state, val) => {
      state.showList = val
    },
    HANDLESHOWNAV: (state, val) => {
      state.showNav = val
    },
    HANDLEEXPANDED: (state, val) => {
      state.defaultExpanded = val
    },
  }
}
export default fileStore